import request from '@/utils/request';

// 查询部门列表
export function smartSpeakerList(query) {
  return request({
    url: '/pk-retirement/smart-speaker/list',
    method: 'get',
    params: query,
  })
}

export function getApplySelectOptions() {
  return request({
    url: '/pk-retirement/smart-speaker/get-apply-select-options',
    method: 'get',
  })
}

export function getModelSelectOptions() {
  return request({
    url: '/pk-retirement/smart-speaker/get-model-select-options',
    method: 'get',
  })
}

export function getAgentSelectOptions() {
  return request({
    url: '/pk-retirement/smart-speaker/get-agent-select-options',
    method: 'get',
  })
}

export function deviceBind(data) {
  return request({
    url: '/pk-retirement/smart-speaker/device-bind',
    method: 'post',
    data: data,
  })
}

export function deviceUnbind(data) {
  return request({
    url: '/pk-retirement/smart-speaker/device-unbind',
    method: 'put',
    data: data,
  })
}

export function agentList(query) {
  return request({
    url: '/pk-retirement/agent/list',
    method: 'get',
    params: query,
  })
}

export function agentSave(data) {
  return request({
    url: '/pk-retirement/agent/save',
    method: 'post',
    data: data,
  })
}

export function agentDelete(data) {
  return request({
    url: '/pk-retirement/agent/delete',
    method: 'delete',
    data,
  })
}

export function isEnableStatus(data) {
  return request({
    url: '/pk-retirement/agent/update-status',
    method: 'put',
    data: data,
  })
}

export function callRecord(query) {
  return request({
    url: '/pk-retirement/call-record/list',
    method: 'get',
    params: query,
  })
}

export function callRecordSave(data) {
  return request({
    url: '/pk-retirement/call-record/save',
    method: 'post',
    data: data,
  })
}

export function callRecordUpdate(data) {
  return request({
    url: '/pk-retirement/call-record/update',
    method: 'put',
    data: data,
  })
}

export function getSysUserSelectOptions() {
  return request({
    url: '/ruoyi-system/user/get-sys-user-select-options',
    method: 'get',
  })
}

export function getTokenDueros(query) {
  return request({
    url: '/pk-retirement/dueros-api/get-token',
    method: 'get',
    params: query,
  })
}


export function getHomeBedApplyId(code) {
  return request({
    url: '/pk-retirement/call-record/get-home-bed-apply-id/'+code,
    method: 'get',
  })
}


export function isAgent() {
  return request({
    url: '/pk-retirement/agent/is-agent',
    method: 'get',
  })
}


export function getDeviceInfo(code) {
  return request({
    url: '/pk-retirement/dueros-api/get-device-info/'+code,
    method: 'get',
  })
}
